package com.jk.order.mapper;

import com.jk.order.pojo.CustomerOrder;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;

import javax.transaction.Transactional;
import java.util.List;

public interface OrderRepo extends JpaRepository<CustomerOrder,String> {
    @Override
    List<CustomerOrder> findAll();

    List<CustomerOrder> findCustomerOrdersByCustomerId(String customerId);

    CustomerOrder findCustomerOrderByCustomerOrderId(String customerOrderId);

    @Transactional
    @Modifying
    void deleteByCustomerOrderId(String cOid);

}
